package com.hst.capacity.domain.model.response.setting.price;

import com.hst.capacity.domain.model.entity.setting.airport.AirportEntity;
import com.hst.capacity.domain.model.entity.setting.line.IntercityLineEntity;
import com.hst.capacity.domain.model.entity.setting.price.AirportPriceEntity;
import com.hst.capacity.domain.model.entity.setting.price.IntercityPriceEntity;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
public class AirportSearchVO {

    private String idPrice;
    private String idFranchisee;
    private Integer idServiceType;
    private Integer idVehicleType;
    private String idAirport;
    private Float servicePrice;
    private Integer maxServiceMileage;
    private Float exceedingMileagePrice;
    private Integer maxWaitingTime;
    private Integer maxServiceTime;
    private Float exceedingTimePrice;
    private Float waitingTimePrice;
    private String nightServiceTime;
    private Float nightServicePrice;
    private String memo;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private String createBy;

    private String cityCode;
    private String cityName;
    private String airportName;
    private String intro;
    private String iata;
    private String icao;
    private String address;
    private String location;
    private Double lng;
    private Double lat;
    private String hotAirport;


    public AirportSearchVO(AirportPriceEntity priceEntity, AirportEntity airportEntity) {
        this.idPrice = priceEntity.getIdServicePriceType();
        this.idFranchisee = priceEntity.getIdFranchisee();
        this.idServiceType = priceEntity.getIdServiceType();
        this.idVehicleType = priceEntity.getIdVehicleType();
        this.idAirport = priceEntity.getIdAirport();
        this.servicePrice = priceEntity.getServicePrice();
        this.maxServiceMileage = priceEntity.getMaxServiceMileage();
        this.exceedingMileagePrice = priceEntity.getExceedingMileagePrice();
        this.maxWaitingTime = priceEntity.getMaxWaitingTime();
        this.maxServiceTime = priceEntity.getMaxServiceTime();
        this.exceedingTimePrice = priceEntity.getExceedingTimePrice();
        this.waitingTimePrice = priceEntity.getWaitingTimePrice();
        this.nightServiceTime = priceEntity.getNightServiceTime();
        this.nightServicePrice = priceEntity.getNightServicePrice();
        this.memo = priceEntity.getMemo();
        this.createTime=priceEntity.getCreateTime();
        this.updateTime=priceEntity.getUpdateTime();
        this.createBy=priceEntity.getCreateBy();

        this.cityCode = airportEntity.getCityCode();
        this.cityName = airportEntity.getCityName();
        this.airportName = airportEntity.getName();
        this.intro = airportEntity.getIntro();
        this.iata = airportEntity.getIata();
        this.icao = airportEntity.getIcao();
        this.address = airportEntity.getAddress();
        this.location = airportEntity.getLocation();
        this.lng = airportEntity.getLng();
        this.lat = airportEntity.getLat();
        this.hotAirport = airportEntity.getHotAirport();
    }

}
